home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ WinXP Explorer CompDesc 1.xpl < prev    next >
Text File  |  2004-02-20  |  4KB  |  101 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="8"
  3. "COUNT"="3"
  4. "UIPATH 1"="Appearance\Explorer\Settings"
  5. "UIPATH 2"="Network\Explorer"
  6. "NAME"="Remote Computers Description"
  7. "TEXT 1"="Show Desc..."
  8. "TEXT 2"="Edit Desc..."
  9. "TEXT 3"="Delete"
  10. "VERSION"="1.10"
  11. "OSVERSION"="0000011"
  12. "LANGUAGE"="VBScript"
  13. "DESCRIPTION 1"="If you have drives connected through your network, you might see that Windows does no longer simply display the server name inside Explorer "software on FileServer1 (S:)" but will use the computer description of the server "software on Central Fileserver for our company (S:)" if any."
  14. "DESCRIPTION 2"="Basically this function should help people to more easily select the server they want to use but it can also be very annoying having so long drive description inside Explorer. Moreover, this function will only retrieve the computer description once. This means, if the server description was a very long name before ("Central Fileserver for our Company") and is later changed to a shorter name ("Central Fileserver") you will still see the old, long name. That's because Explorer does retrieve the computer description once and stores it locally. It does not care if the server its description changes later on."
  15. "DESCRIPTION 3"="With this plug-in you can either edit the description to nothing (empty field) and thus you will simply see the server name (e.g. "software on FileServer1 (S:)"). This is the same behavior as Windows NT or Windows 2000 are using."
  16. "DESCRIPTION 4"="You might also simply change the description to something you might like (e.g. "software on My Cool New Description (S:)"). "
  17. "DESCRIPTION 5"="The final option you have is to simply delete a server entry and on the next connection to that server, Windows will retrieve the current computer description again and store it. "
  18. "AUTHOR"="Xteq Systems"
  19. "CONTACTURL"="http://www.xteq.com"
  20. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  21. "COMMENT 1"="Thanks to alzheimer (tobipick.de) for this plug-in!"
  22. "COMMENT 2"="Thanks to umuhk for the backslash error notice!"
  23.  
  24.  
  25. sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComputerDescriptions\"
  26. iCount=0
  27.  
  28. Sub Plugin_Initialize  
  29.    Call ReadData
  30.  
  31. End Sub
  32.  
  33. Sub ReadData
  34.  for i=1 to iCount
  35.      Call SetUIElement(i,"")
  36.  next 
  37.  
  38.    iCount=RegEnumValues(sP)
  39.    for l=1 to iCount
  40.      s=sP & RegEnumElement(l) 
  41.      s2=RegReadValue(s)
  42.  
  43.      Call SetUIElement(l,RegEnumElement(l) & " = " & s2)
  44.    next
  45.  
  46. End Sub
  47.  
  48. Sub Plugin_CheckData(ElementIndex)
  49. End Sub
  50.  
  51. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  52.  if ElementSubIndex>0 then 'OK, user has selected an item
  53.  
  54.     sValue=RegEnumElement(ElementSubIndex)
  55.     sValue=Replace(sValue,"\","\\")
  56.     s=sP & sValue
  57.     sV=RegReadValue(s) 
  58.  
  59.  
  60.     If ElementIndex=1 then 
  61.        'Show Info
  62.  
  63.        Call MsgInformation("Description of the selected computer: " & chr(13) & chr(10) & sV)
  64.        exit sub
  65.     end if
  66.  
  67.     if ElementIndex=2 then
  68.        'edit desc
  69.  
  70.        sV=InputWindow("Change description",sV,1)
  71.  
  72.        if IsEmpty(sV)=false then
  73.           'change it (write REG_EXPAND_SZ)
  74.           Call RegWriteValue(s,sV,1)
  75.           
  76.           'update UI
  77.           Call ReadData
  78.        end if 
  79.  
  80.     end if
  81.  
  82.     If ElementIndex=3 then    
  83.        'Delete!!
  84.  
  85.        Call RegDeleteValue(s) 
  86.        Call ReadData 
  87.     end if
  88.  
  89.  
  90.  
  91.  else
  92.   Call MsgWarning("No item selected - please select an item first.")
  93.  end if
  94. End Sub
  95.  
  96. Sub Plugin_Terminate 
  97. End Sub
  98.  
  99.  
  100.  
  101.